<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/template.xhtml">
	<ui:define name="content">
		<h:form id="form">
			<p:panel header="Trocar Senha">
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="Login" />
						<h:outputLabel styleClass="form-control"
							value="#{userSession.user.usuario.login}" />
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="Digite a senha atual" />
						<h:inputSecret styleClass="form-control" required="true"
							value="#{loginBean.senha}"/>
					</div>
				</div>
				<p:spacer></p:spacer>
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="Digite a nova senha" />
						<h:inputSecret styleClass="form-control" required="true"
							value="#{loginBean.novaSenha1}" />
					</div>
				</div>
				<div class="row">
					<div class="col-lg-6">
						<h:outputLabel value="Digite a nova senha novamente" />
						<h:inputSecret styleClass="form-control" required="true"
							value="#{loginBean.novaSenha2}" />
					</div>
				</div>
			</p:panel>
			<p:commandButton value="Trocar Senha"
				action="#{loginBean.trocarSenha}" />
		</h:form>
	</ui:define>
</ui:composition>
</html>